﻿-var isCanGetMoney = user.HasPermission("MoneyRecieve")
=HTMLHelper.HiddenInput("iscangetmoney", isCanGetMoney)
%table.orderinfo.data{width="100%"}
  %tr
    %th{colspan=3}
      .padded5 Стоимость
  %tr
    %td{width="65%"}
      %label.padded5.required{for="tax"}Госпошлина + ПИТР:
    %td{width="22%"}
      %input#tax.px50.required.number{tabindex="11",name="tax",value=entity.Tax,maxlength="10", onchange="calculateCost(this);", min="0"}
    %td{width="5%"}
      .padded5="Руб."
  %tr
    %td
      %label.padded5.required{for="copyprice"}Копии + ПИТР:
    %td              
      %input#copyprice.px50.required.number{tabindex="12",name="copyprice",value=entity.CopyPrice,maxlength="10", onchange="calculateCost(this);", min="0"}
    %td
      .padded5="Руб."
  %tr
    %td
      %label.padded5.required{for="docprice"}Ксерокс:
    %td          
      %input#docprice.px50.required.number{tabindex="13",name="docprice",value=entity.DocPrice,maxlength="10", onchange="calculateCost(this);", min="0"}
    %td
      .padded5="Руб."
  %tr
    %td
      .padded5.bold="Итого:"
    %td    
      %div#result.px50.padded3.bold{name="result",value=(create) ? 0 :(entity.DocPrice + entity.CopyPrice + entity.Tax),maxlength="10"}=(create) ? 0 :(entity.DocPrice + entity.CopyPrice + entity.Tax)
    %td
      .padded5.bold="Руб."
  %tr
    %td
      .field.padded5.floatleft
        %label.radio{for="iscashless"}
          =HTMLHelper.Checkbox("iscashless","True","",entity.IsCashless,false,"tabindex=14")
          ="Безнал"
      .field.padded5
        %label.radio{for="isprepayment"}
          =HTMLHelper.Checkbox("isprepayment","True","",entity.IsPrepayment,false,"tabindex=15")
          ="Аванс"  
    %td
    %td
  %tr
    %td
      .spacer7 
    %td
    %td
  %tr.doubleborder
    %td
      .field.padded5.floatleft
        %label.radio{for="ispaid"}
          -if (!readOnly && user is User && user.HasPermission("MoneyRecieve"))
            =HTMLHelper.Checkbox("ispaid","True","",entity.IsPaid,false,"tabindex=19")
            ="Оплачено"
          -else
            =HTMLHelper.HiddenInput("ispaid", entity.IsPaid)
            #ispaidtext.inline.marginright10
              =(entity.IsPaid) ? "Оплачено" : "Не оплачено"
            -if (!popup && !create && isCanGetMoney && !entity.IsInternal)
              .inline
                =HTMLHelper.HiddenInput("ispaidhidden", entity.IsPaid)               
                %a.noul.small{tabindex="19", href="#", onclick=String.Format("return changeIsPaidAttribute(this,{0});", entity.Id)} Изменить                                         
    %td
    %td